#!/bin/bash
OK=0
WARN=1
CRITICAL=2
UNKNOWN=3
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
export DISPLAY=:0


nGPU=$(fglrxinfo|grep "screen" |wc -l)
# echo $nGPU
if [ $nGPU -gt 0 ]; then
      echo "GPU is OK $nGPU"
      exit $OK
else
      echo "GPU is critical $nGPU"
      exit $CRITICAL
fi
